
<%@ page import="java.util.List"%>
<%@ page import="domain.model.group.IGroup"%>
<%@ page import="domain.model.user.IUser"%>

<!-- The below java code gives the group name and description -->
<%
	//long groupID = (Long)session.getAttribute("usergroup");
	IGroup userGroup = (IGroup) request.getAttribute("userGroup");
	if (userGroup.getId() == 0) {
		request.getRequestDispatcher("/browsegroups").forward(request,response);
	}
%>
			<h2>${title}</h2>
			<p>

				<b>Description:</b>
				<%=userGroup.getDescription()%>
			</p>
			<p></p>

			<!-- 
Below is ending the for loop and if statement above
 -->

			<div id="queryContents">
			
				<table border="0" style="border-collapse: collapse;">
					<tr>
						<th>First Name</th>
						<th>Last Name</th>
						<th>&nbsp;</th>
					</tr>
					<%
						List<IUser> members = (List<IUser>) request.getAttribute("members");
						for (IUser member : members)
						{
					%>
							<tr>
								<td><%=member.getFirstName()%></td>
								<td><%=member.getLastName()%></td>
								<td id="btn_<%=member.getId()%>"><a href="" class="button1" onclick="removeMember(<%=member.getId()%>, <%=member.getVersion()%>); return false;">Remove</a></td>
							</tr>
					<%
						}
					%>
				</table>

			</div>
			<!--closing queryContents -->
		